Skip to content

Conversation

@joaquincasal
Copy link
Collaborator

Purpose

Add UI for the app sidebar.

Approach

This only includes how the sidebar looks, the behaviour of showing the correct link will be handled in a separate PR.

Testing steps

Automatic tests were added.

Screenshot 2025-10-03 at 16 01 46

We display entries id for now, when we have to fetch the actual entries we'll use entry titles.

@joaquincasal joaquincasal requested a review from a team as a code owner October 3, 2025 19:22
@joaquincasal joaquincasal changed the title Add Sidebar UI [MAPS-58] Closest Preview: Add Sidebar UI [MAPS-58] Oct 3, 2025
Comment on lines 12 to 22
it('Renders entry list with titles and relative dates', async () => {
const { getAllByText } = render(<Sidebar />);

expect(getByText('Hello Sidebar Component (AppId: test-app)')).toBeInTheDocument();
await waitFor(() => {
const entryTitles = getAllByText('Entry id', { exact: false });
expect(entryTitles).toHaveLength(5);
});

const updatedTexts = getAllByText(/Updated/);
expect(updatedTexts).toHaveLength(5);
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Perhaps I'll change the title of this test to 'Renders entry list with ids and relative dates', and when we change the logic to use the titles come back here and change it.
Because currently we are rendering a entry list with ids.

Same with the
const entryTitles = getAllByText('Entry id', { exact: false });
to
const entryIds = getAllByText('Entry id', { exact: false });

@joaquincasal joaquincasal merged commit 5abbf6f into closest-preview-app Oct 6, 2025
13 checks passed
@joaquincasal joaquincasal deleted the maps-58 branch October 6, 2025 13:35
joaquincasal added a commit that referenced this pull request Oct 16, 2025
* Scaffolding for closest preview [MAPS-62] (#10135)

* Scaffolding

* chore(closest-preview): update tsconfig.json to enable esModuleInterop and add vitest types

* Closest Preview: Adding Config Screen [MAPS-7] (#10143)

* adding config screen for Closest Preview

* changing interface for type

* updating fomra version + initial version of content type preview exclusion

* encapsulating live preview content types fetch

* Closest Preview: Add Sidebar UI [MAPS-58] (#10145)

* Add sidebar ui

* Fix config screen tests

* Update test name

* Closest Preview: Adding backlinks logic [MAPS-60] (#10149)

* removing filters and doing it through query

* generic refactors

* adding tests

* adding depth check in sidebar

* removing unused interface

* creating helpers + showing display field + modifying max depth ui

* removing depth logic

* doing filtering al the last moment

* refactor backlinks logic

* fixing tests to match the changes

* removing unused import

* renames and inline

* Add note with live preview instructions in config screen

* Add empty state

* Adjust note variant

* Update deploy script

---------

Co-authored-by: JuliRossi <[email protected]>
Co-authored-by: Franco Banfi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants